﻿namespace SLClient.CustomerControls
{
    using System;

    public class CalControl
    {
        public static int GetBetCount(int playid, int numbercount)
        {
            switch (playid)
            {
                case 0x29:
                case 11:
                case 15:
                    return GetZ6BetCount(numbercount);

                case 0x2a:
                case 12:
                case 0x10:
                    return GetZ3BetCount(numbercount);

                case 0x2e:
                case 0x1c:
                case 0x19:
                    return GetZ2BetCount(numbercount);
            }
            return 0;
        }

        public static int GetZ2BetCount(int numbercount)
        {
            return (numbercount * (numbercount - 1));
        }

        public static int GetZ3BetCount(int numbercount)
        {
            return ((numbercount * (numbercount - 1)) * 3);
        }

        public static int GetZ6BetCount(int numbercount)
        {
            return ((numbercount * (numbercount - 1)) * (numbercount - 2));
        }
    }
}

